package com.songhq.data.constant;



import java.util.HashMap;
import java.util.Map;

public class ServiceCode {

    private static Map<Integer, String> message = new HashMap<Integer, String>();

    static {
        message.put(ServiceCode.SUCC, "success");
        message.put(ServiceCode.FAIL, "fail");

        message.put(ServiceCode.T700, "intf not exist");

        message.put(ServiceCode.T910, "data is too large");

        message.put(ServiceCode.T911, "data is empty");

        message.put(ServiceCode.T800, "land expiration");
        message.put(ServiceCode.T410, "request parameter error.");
        message.put(ServiceCode.T411, "parameter configuration error.");

    }

    public final static int T410 = 410;
    public final static int T411 = 411;
    public final static int T412 = 412;

    //请求成功
    public final static int SUCC = 200;
    //系统异常
    public final static int FAIL = 500;

    //======用户登录已过期
    public final static int T800 = 800;
    //用户不存在
    public final static int T801 = 801;

    //======活动资源配置无资源
    public final static int T600 = 600;
    //======活动资源已超出预算
    public final static int T601 = 601;
    //物品时间段不能有交集
    public final static int T602 = 602;
    //该时间段所有物品中奖概率总和不能超过100
    public final static int T603 = 603;
    //新增一级资源物品异常
    public final static int T604 = 604;
    //一级资源物品名称已存在
    public final static int T605 = 605;
    //二级资源物品名称已存在
    public final static int T606 = 606;
    //资源类型清单分页查询异常
    public final static int T607 = 607;
    //资源详情查询异常
    public final static int T608 = 608;
    //二级物品父物品不能ID为空
    public final static int T609 = 609;
    //删除二级资源物品异常
    public final static int T610 = 610;
    //查看竞猜活动列表异常
    public final static int T611 = 611;
    //保存新增的竞猜活动异常
    public final static int T612 = 612;
    //查询竞猜活动详情异常
    public final static int T613 = 613;
    //保存修改后的竞猜活动异常
    public final static int T614 = 614;
    //竞猜活动发布异常
    public final static int T615 = 615;
    //活动状态为未发布，并且结束时间>当前时间，才可发布
    public final static int T616 = 616;
    //同一时间段内只允许有一个已发布的活动
    public final static int T617 = 617;
    //该活动不能删除
    public final static int T618 = 618;
    //竞猜活动结束异常
    public final static int T619 = 619;
    //发送短信验证码异常
    public final static int T620 = 620;
    //一分钟只能发送一次
    public final static int T621 = 621;
    //短信验证发送失败
    public final static int T622 = 622;
    //手机号未绑定
    public final static int T623 = 623;
    //验证码已过期
    public final static int T624 = 624;
    //您输入的验证码有误
    public final static int T625 = 625;
    //活动状态为未发布或者已发布才可结束活动
    public final static int T626 = 626;

    //接口不存在
    public final static int T700 = 700;
    //配置错误
    public final static int T701 = 701;
    //创建活动数据保存异常
    public final static int T702 = 702;
    //报表导出异常
    public final static int T900 = 900;
    //报表查询异常
    public final static int T901 = 901;
    //获取密钥异常
    public final static int T902 = 902;
    //查询操作日志异常
    public final static int T903 = 903;
    //查询操作日志异常
    public final static int T904 = 904;
    //查看活动详情异常
    public final static int T905 = 905;
    //删除礼包物品信息异常
    public final static int T906 = 906;
    //查询规则信息异常
    public final static int T907 = 907;
    //更新规则系统标签白名单异常
    public final static int T908 = 908;
    //更新规则系统标签黑名单异常
    public final static int T909 = 909;
    //导入数据量过大
    public final static int T910 = 910;
    //导入数据量不能为空
    public final static int T911 = 911;


    public static final String SRV_CODE = "srv_code";

    public static final class HttpCode {
        public final static Integer SUCCESS = 200;
        public final static Integer INVALID_REQUEST = 400;
        public final static Integer SERVER_ERROR = 500;
    }

    public static final class SrvCode {
        public final static Integer SUCCESS = 200;
        public final static Integer ERROR = 500;
    }

    public static final class JWTCode {
        /**
         * token
         */
        public static final int RESCODE_REFTOKEN_MSG = 1006;        //刷新TOKEN(有返回数据)
        public static final int RESCODE_REFTOKEN = 1007;            //刷新TOKEN

        public static final int JWT_ERRCODE_NULL = 4000;            //Token不存在
        public static final int JWT_ERRCODE_EXPIRE = 4001;            //Token过期
        public static final int JWT_ERRCODE_FAIL = 4002;            //验证不通过

        /**
         * JWT
         */
        public static final String JWT_SECERT = "8677df7fc3a34e26a61c034d5ec8245d";            //密匙
        public static final long JWT_TTL = 60 * 60 * 1000;                                    //token有效时间
    }

}